import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/biz/holidayaccount/` + url, ...arg)

/**
 * 假期总额Api接口管理器
 *
 * @author 罗超
 * @date  2024/01/18 21:05
 **/
export default {
	// 获取假期总额分页
	sysHolidayAccountPage(data) {
		return request('page', data, 'get')
	},
	// 提交假期总额表单 edit为true时为编辑，默认为新增
	sysHolidayAccountSubmitForm(data, edit = false) {
		return request(edit ? 'edit' : 'add', data)
	},
	// 删除假期总额
	sysHolidayAccountDelete(data) {
		return request('delete', data)
	},
	// 获取假期总额详情
	sysHolidayAccountDetail(data) {
		return request('detail', data, 'get')
	},
	holidayExport(data) {
		return request('holidayExport', data, 'get', {
			responseType: 'blob'
		})
	},
	holidayImport(data) {
		return request('import', data)
	}
}
